package com.hnit.camellia.controller;


import com.hnit.camellia.entity.Category;
import com.hnit.camellia.entity.MapData;
import com.hnit.camellia.entity.ScatterData;
import com.hnit.camellia.entity.vo.CategoryVo;
import com.hnit.camellia.result.Result;
import com.hnit.camellia.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/category")
@Slf4j
@CrossOrigin(origins = "http://localhost:5173")
public class CategoryController {


    @Autowired
    CategoryService categoryServicel;
    @GetMapping("/list")
    public Result <List<CategoryVo>> list() {
        return Result.success(categoryServicel.selectCategoryVoList());
    }











}
